import { useMemo } from 'react'
import style from './index.module.less'

function Main ({ value }) {
  const v = useMemo(() => {
    if (typeof value === 'string' && value.length > 0) {
      return value
    }
    return ''
  }, [value])
  return (
    <div className={style['editor-content-view']} dangerouslySetInnerHTML={{ __html: v }}></div>
  )
}

export default Main
